#ifndef UNIT_H
#define UNIT_H
#include "../entity.h"
#include "pathfinding.h"

class Tank;

class Unit : public Entity
{
protected:

    queue<Node*> waypoints;
    Node *currentWaypoint;

    Entity* target;
    bool attacking;
    int range;
    int attackStrength;
    int reloadTime;
    int timeToReload;

public:
    Unit();
    void update();
    void setAttackTarget(Entity *);

    void setRange(int rng) {range = rng;}
    void stopAttacking() {target = NULL; attacking = false;}
    void attack();

};
class Tank: public Unit{

public:
    Tank(int initX, int initY);
};
class Truck: public Unit {

public:
    Truck(int initX, int initY);
};

#endif // UNIT_H
